﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="UI.Helper" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Đăng Nhập</title>
    <%= Utils.IncludeCSS(this.Html, "~/Content/Admin/screen.css")%>
    <!--  jquery core -->
    <%= Utils.IncludeJS(this.Html, "~/Scripts/jquery-1.4.1.min.js")%>
    <!--  validate jquery -->
    <%= Utils.IncludeJS(this.Html, "~/Scripts/jquery.validate.min.js")%>
    <!-- Custom jquery scripts -->
    <%= Utils.IncludeJS(this.Html, "~/Scripts/Admin/custom_jquery.js")%>
    <!-- MUST BE THE LAST SCRIPT IN <HEAD></HEAD></HEAD> png fix -->
    <%= Utils.IncludeJS(this.Html, "~/Scripts/Admin/jquery.pngFix.pack.js")%>
    <script type="text/javascript">
        $(document).ready(function () {
            $(document).pngFix();
        });
    </script>
    <style type="text/css">
        div.error { float: none; color: red; padding-left: .5em; vertical-align: top; font-weight:bold; }
    </style>
</head>
<body id="login-bg" style="text-align: center;">

    <!-- Start: login-holder -->
    <div id="login-holder">
    
        <!-- start logo -->
        <div id="logo-login">
            <a href="index.html"><%--<img src="<%= Utils.ResolveUrl(this.Html, "~/") %>images/admin/shared/logo.png" width="156" height="40" alt="" />--%></a>
	    </div>
        <!-- end logo -->

        <div class="clear"></div>

        <!--  start loginbox ................................................................................. -->
        <div id="loginbox">
            
            <% if (TempData[Constants.MESSAGE] != null)
            { %>
            <div class="error" style="text-align : center; font-size : 18px; line-height: 30px;">
            <%= Html.Encode(TempData[Constants.MESSAGE].ToString())%>
            </div>
            <%} %>

            <div class="clear"></div>

            <!--  start login-inner -->
	        <div id="login-inner">
                <% Html.BeginForm("LogIn", "Home", FormMethod.Post, new {name = "loginForm", id="loginForm"} ); %>
                <table border="0" cellpadding="0" cellspacing="0">
		            <tr>
			            <th>Tên đăng nhập</th>
			            <td><input type="text" id="username" name="username" class="login-inp" /></td>
		            </tr>
		            <tr>
			            <th>Mật khẩu</th>
			            <td><input type="password" id="password" name="password" value="************"  onfocus="this.value=''" class="login-inp" /></td>
		            </tr>
		            <tr>
			            <th></th>
			            <td><input type="submit" value="Đăng nhập" class="submit-login"  /></td>
		            </tr>
		        </table>
                <% Html.EndForm();%>
            </div>
            <!--  end login-inner -->
            <div class="clear"></div>

        </div>
        <!--  end loginbox -->
    </div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#loginForm").validate({
            rules:
            {
                username: { required: true},
                password: { required: true}
            },
            messages:
            {
                username: { required: 'Hãy nhập tên đăng nhập.' },
                password: { required: 'Hãy nhập mật khẩu.' }
            },
            errorElement: "div"
        })
    });
</script>
</body>
</html>